﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using System.Web;
using PBDesk.Utilities;

namespace PBDesk.com.Extension.UmbHelper
{
    public static class MyUmb
    {
        public static string SiteName
        {
            get
            {
                return ConfigurationManager.AppSettings["SiteName"] ?? "PBDesk.com";
            }
        }
        public static string PrefixPageTitle
        {
            get
            {
                return ConfigurationManager.AppSettings["PrefixPageTitle"] ?? string.Empty;
            }
        }

        public static string PrefixMetaDesc
        {
            get
            {
                return ConfigurationManager.AppSettings["PrefixMetaDesc"] ?? string.Empty;
            }
        }
        
        public static string PrefixMetaKeywords
        {
            get
            {
                return ConfigurationManager.AppSettings["PrefixMetaKeywords"] ?? string.Empty;
            }
        }

        public static string AllTags
        {
            get
            {
                return ConfigurationManager.AppSettings["TagList"] ?? string.Empty;
            }
        }

        public static List<string> TagList
        {
            get
            {
                return AllTags.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList<string>();
            }
        }

        public static string AllCategories
        {
            get
            {
                return ConfigurationManager.AppSettings["CategoryList"] ?? string.Empty;
            }
        }

        public static List<string> CategoryList
        {
            get
            {
                return AllCategories.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList<string>();
            }
        }

        public static string CacheFilesLoc
        {
            get
            {
                return HttpContext.Current.Request.PhysicalApplicationPath + ConfigurationManager.AppSettings["CacheFilePath"] ?? "App_Data\\MyUmb\\CacheFiles\\";
            }
        }

        public static string MyConfigsLoc
        {
            get
            {
                return HttpContext.Current.Request.PhysicalApplicationPath + ConfigurationManager.AppSettings["MyConfigsPath"] ?? "App_Data\\MyUmb\\MyConfigs\\";
            }
        }

       
    }
}
